//template_match.h, interface header file for this library

// Copyright 2016-2017  Xinglong Gao
// Haier U Home Intelligence technology LTD.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.

#ifndef _TEMPLATE_MATCH_H_
#define _TEMPLATE_MATCH_H_
#include <cstdlib>
#include <cstdio>

#ifdef __cplusplus
extern "C" {
#endif
#define MAX_CONTENT_LEN 2048
#define MAX_STR_LEN 1024
#define MAX_NAME_LEN 512
#define MAX_ID_LEN 256

	typedef struct  UserCommandInfo
	{
		char user_id_[MAX_ID_LEN];
		char singer_key_[MAX_NAME_LEN];
		char singer_value_[MAX_STR_LEN];
		char music_key_[MAX_NAME_LEN];
		char music_value_[MAX_STR_LEN];
	};	

	typedef struct UserCommand
	{
		char user_id_[MAX_ID_LEN];
		char sentence_[MAX_STR_LEN];
	};


	int Init(const char* template_file_name);
	int Process(const UserCommand* command, UserCommandInfo* command_info_result);
	int Stop();


#ifdef __cplusplus
}
#endif

#endif